<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:c="http://java.sun.com/jsp/jstl/core"
	xmlns:p="http://primefaces.org/ui"
	xmlns:pe="http://primefaces.org/ui/extensions">

<ui:composition template="/resources/templates/templateLista.xhtml">
	<!-- Parametros utilizados pelo templateLista -->
	<ui:param name="pManagedBean" value="#{usuarioBean}" />
	<ui:param name="pIsExibirAcoesPadrao" value="false" />
	<ui:param name="pIsExibirBtnNovo" value="true" />
	<ui:param name="pListaEFormularioNaMesmaPagina" value="true" />

	<!-- BREAD CRUMBS -->
	<ui:define name="meusBreadCrumbs">
		<p:breadCrumb>
			<p:menuitem value="#{i18n['bc.home']}" action="#{loginBean.showHome}" />
			<p:menuitem value="#{i18n['bc.cadastros.envolvidos']}"
				action="#{envolvidoProjetoBean.showLista(true)}" />
		</p:breadCrumb>
	</ui:define>

	<!-- CAMPOS DOS FORMULARIOS -->
	<ui:define name="camposDoFormulario">

		<div class="form-group">
			<h:outputLabel value="#{i18n['envolvido.label.imagem']}"
				styleClass="col-sm-2 control-label" />
			<div class="col-sm-10">
				<p:fileUpload style="width:120px;"
					fileUploadListener="#{pManagedBean.doInserirImagemListener}"
					update="thumbImagem" process="@this" mode="advanced" auto="true"
					sizeLimit="524288" allowTypes="/(\.|\/)(jpe?g)$/"
					oncomplete="statusDialog.hide();" />
				<h:panelGroup id="thumbImagem">
					<h:graphicImage value="#{pManagedBean.avatarUsuario}"
						styleClass="thumbnail" style="max-width:120px;" />
				</h:panelGroup>


			</div>
		</div>

		<div class="form-group">
			<h:outputLabel for="campo_nome"
				value="#{i18n['envolvido.label.nome']}"
				styleClass="col-sm-2 control-label" />
			<div class="col-sm-10">
				<p:inputText id="campo_nome"
					value="#{pManagedBean.objetoPrincipal.pessoa.nome}"
					placeholder="#{i18n['envolvido.label.nome.wm']}"
					styleClass="form-control" />
			</div>
		</div>
		<div class="form-group">
			<h:outputLabel for="campo_email"
				value="#{i18n['envolvido.label.email']}"
				styleClass="col-sm-2 control-label" />
			<div class="col-sm-10">
				<p:inputText id="campo_email"
					value="#{pManagedBean.objetoPrincipal.email}"
					styleClass="form-control"
					placeholder="#{i18n['envolvido.label.email.wm']}" />
			</div>
		</div>
			<div class="form-group">
				<h:outputLabel value="#{i18n['envolvido.label.password']}"
					for="campo_senha" styleClass="col-sm-2 control-label" />
				<div class="col-sm-10">
					<p:password styleClass="form-control" id="campo_senha"
						placeholder="#{i18n['envolvido.label.password.wm']}"
						value="#{pManagedBean.objetoPrincipal.senha}" />
				</div>
			</div>
	</ui:define>

	<!-- CAMPOS COLUNAS DA DATA_TABLE -->
	<!-- Colunas com Autofiltro -->
	<ui:define name="colunasDataTableComAutofiltro">
		<p:column id="col_tipo" sortBy="#{item.email}"
			filterBy="#{item.email}"
			footerText="#{i18n.colContem}" filterMatchMode="contains"
			filterPosition="top">
			<f:facet name="header">
				<h:outputText value="#{i18n['envolvido.label.tipoenvolvido']}" />
			</f:facet>
			<h:outputText value="#{item.email}" />
		</p:column>
	</ui:define>
</ui:composition>
</html>